package com.smart.common.scheduler;

import com.smart.common.scheduler.service.HotWorkScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author: zyh
 * @date: 2023-09-25
 */
@Slf4j
@Component
public class HotWorkScheduleTaskScheduler {

    @Autowired
    private HotWorkScheduleService hotWorkScheduleService;

    /**
     * 动火作业未上传提醒 每周五下午四点
     */
    //@Scheduled(cron = "0 0 16 ? * FRI")
    //public void hotWorkHaveNotUploaded(){
    //    hotWorkScheduleService.hotWorkHaveNotUploaded();
    //}

    /**
     * 动火作业管理功能未开通提醒 每周一上午十一点
     */
    //@Scheduled(cron = "0 0 11 ? * MON")
    //public void hotWorkManagementHaveNotPass(){
    //    hotWorkScheduleService.hotWorkManagementHaveNotPass();
    //}

    /**
     * 动火作业视频超三个月的自动清除 每天凌晨一点执行一次
     */
    @Scheduled(cron = "0 0 1 * * ?")
    public void deletedHotWorkVideo(){
        hotWorkScheduleService.deletedHotWorkVideo();
    }

}
